﻿@using ExampleWebApplication.Controllers
@using ExampleWebApplication.Models
@using ExampleWebApplication.Properties
<h2>
    @NHibernateStrings.Example1
</h2>
<h3>
    <a target="_blank" href="http://demos.telerik.com/aspnet-mvc/razor/grid/ajaxbinding">
        Telerik demo version</a>
</h3>
@(Html.Telerik().Grid<ProductModel>().Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(d => d.ProductID).Width(80);
            columns.Bound(d => d.ProductName);
            columns.Bound(d => d.QuantityPerUnit);
            columns.Bound(d => d.Category.CategoryName).Title("Category");
        })
        .EnableCustomBinding(true).Sortable().Filterable(x => x.ShowOrOption()).Groupable().Pageable(x => x.PageSize(15))
        .DataBinding(dataBinding => dataBinding.Ajax().Select<NHibernateController>(ctr => ctr.CustomAjaxBindingData(null))))